<?php

//Load Master Page
require_once('../shared/layout.php');

class Index extends Layout {

    protected $objServiceArray;
    protected $objProjectArray;

    protected function Form_Create() {
        parent::Form_Create();

        $this->strTitle = 'Projects';
        
        $this->objDefaultWaitIcon->AddCssFile('../../../content/plugins/jquery-adipoli/adipoli.css');
        $this->objDefaultWaitIcon->AddCssFile('../../../content/css/project/index.css');
        
        $this->objDefaultWaitIcon->AddJavascriptFile('../../../content/plugins/jquery-adipoli/jquery.adipoli.min.js');
        $this->objDefaultWaitIcon->AddJavascriptFile('../../../content/plugins/jquery-isotope/jquery.isotope.min.js');
        $this->objDefaultWaitIcon->AddJavascriptFile('../../../content/js/project/index.js');

        $this->objServiceArray =
                Service::QueryArray(
                        QQ::AndCondition(
                                QQ::Equal(QQN::Service()->IsEnable, true)), QQ::Clause(QQ::OrderBy(QQN::Service()->Order))
        );

        $this->objProjectArray =
                Project::QueryArray(
                        QQ::AndCondition(
                                QQ::Equal(QQN::Project()->IsEnable, true)), QQ::Clause(QQ::OrderBy(QQN::Project()->Name))
        );
    }

}

Index::Run('Index', __DOCROOT__ . __SUBDIRECTORY__ . '/view/project/index.tpl.php');
?>